package com.mall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mall.entity.MmallOrderItem;
import com.mall.mapper.MmallOrderItemMapper;
import com.mall.service.MmallOrderItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.utils.R;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ppmall
 * @since 2021-09-19
 */
@Service
public class MmallOrderItemServiceImpl extends ServiceImpl<MmallOrderItemMapper, MmallOrderItem> implements MmallOrderItemService {

    @Override
    public List<MmallOrderItem> getOrderItemByOrderNo(Long orderNo) {
        QueryWrapper<MmallOrderItem> wrapper = new QueryWrapper<>();
        wrapper.eq("order_no", orderNo);
        List<MmallOrderItem> orderItems = baseMapper.selectList(wrapper);
        return orderItems;
    }
}
